<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo $title?></title>
<link rel="stylesheet" href="${staticServer}/css/t/main.css" />
<link rel="stylesheet" href="${staticServer}/css/t/page.css" />
<link rel="stylesheet" href="${staticServer}/css/t/ask.css" />
<script src="${staticServer}/js/t/jquery.js"></script>
<script src="${staticServer}/js/t/pageset.js"></script>
<script src="${staticServer}/js/t/tips.js"></script>
<script src="${staticServer}/js/t/submitter.js"></script>
<script src="${staticServer}/js/t/match_select.js"></script>
<script src="${staticServer}/js/t/ask_spread.js?1.0"></script>
<script>
$(function(){
	$("#sp_ask").val("<#if spread??>${spread.ask}</#if>");
	$("#<#if spread??>${spread.source}</#if>").attr("checked","checked");
	$("#sp_username").val("<#if spread??>${spread.username}</#if>");

	$("#sp_user_ipt").keyup(function(){
		var nickname = $("#sp_user_ipt").val();
		$.post("${contextPath}/admin/getUserListBynickname.json", {
			"nickname" : nickname
		}, function(ms) {
			 if(ms.user!=null){
			 	var username = ms.user.username;
			 	$("#sp_username").val(username);
			 }
			
		});
	});
});

</script>
</head>
<input type="hidden" id="spcode" value="<#if spread??>${spread.spcode}</#if>"/>
<body>
	<div id="home_link">
		<ul>
			<li><?php echo WEB_NAME?></li>
			<li>&gt;</li>
			<li>添加推广链接</li>
			<li>&gt;</li>
			<li class="current"></li>
		</ul>
	</div>
	<div id="caption">
		<ul>
			<li><span class="title">操作提示：</span></li>
			<li><span class="quote">Ctrl+Enter</span> 提交保存</li>
		</ul>
	</div>
	<div id="container">
		<div id="title"><?php echo $title?></div>
		<table id="tbl_article">
			<tr>
				<th width="25%">推广名称</th>
				<td width="75%"><input type="text" value="<#if spread??>${spread.name}</#if>" id="sp_name" size="50" /></td>
			</tr>
			<tr>
				<th width="25%">选择问卷</th>
				<td width="75%">
					<select id="sp_ask">
						<option value="">请选择</option>
						<#if list??>
							<#list list as list>
								<option value="${list.keyname}">${list.topic}</option>
							</#list>
						</#if>
					</select>
				</td>
			</tr>
			<tr>
				<th width="25%">问卷类型</th>
				<td width="75%">
					<ul id="sp_source">
						<li style="list-style:none;">
							<input type="radio" name="radioGroup" id="nupd5182xxsl" value="nupd5182xxsl"><label for="nupd5182xxsl">网站问卷</label>
						</li>
						<li style="list-style:none;">
							<input type="radio" name="radioGroup" id="l6xdybjjrcjc" value="l6xdybjjrcjc"><label for="l6xdybjjrcjc">手机问卷</label>
						</li>
						<li style="list-style:none;">
							<input type="radio" name="radioGroup" id="czhi7pjiadhu" value="czhi7pjiadhu"><label for="czhi7pjiadhu">19楼问卷</label>
						</li>
						<li style="list-style:none;">
							<input type="radio" name="radioGroup" id="l6e69n6t0xdf" value="l6e69n6t0xdf"><label for="l6e69n6t0xdf">微博问卷</label>
						</li>
						<li style="list-style:none;">
							<input type="radio" name="radioGroup" id="osjrem0am5af" value="osjrem0am5af"><label for="osjrem0am5af">微博粉丝通问卷</label>
						</li>
						<li style="list-style:none;">
							<input type="radio" name="radioGroup" id="frvmppoifgmb" value="frvmppoifgmb"><label for="frvmppoifgmb">今日头条</label>
						</li>
						<li style="list-style:none;">
							<input type="radio" name="radioGroup" id="43ADF8FC3964" value="43ADF8FC3964"><label for="ro9iszkillrp">微信公众号问卷</label>
						</li>
					</ul>
				</td>
			</tr>
			<tr>
				<th width="25%">推广人<em class="caption">（个人推广）</em></th>
				<td width="75%">
					<select id="sp_username">
						<option value="">--请选择目标--</option>
						<#if userlist??>
						<#list userlist as list>
							<option value="${list.username}">${list.nickname}（${list.regions}-${list.jobns}-${list.job}）</option>
						</#list>
						</#if>
					</select>
					<input type="text" id="sp_user_ipt" size="12" maxlength="10" placeholder="输入快捷匹配">
					<p class="line"></p>
					<p class="caption">留空不选择推广人，代表该推广链接所影响的客户来源为自然资源</p></td>
			</tr>
			<tr>
				<th width="25%">推广链接<em class="caption">（自动生成）</em></th>
				<td width="75%">
					<p id="sp_link_container">
						<p id="sp_link_container"><a id="sp_link"></a></p>
					</p>
					<p class="caption">该链接是对外推广所使用的链接地址，可复制直接向外推广</p></td>
			</tr>
		</table>
		<div class="remark">
			<ul>
				<li><span class="title">注意事项：</span></li>
				<li>1、已在使用的推广链接请不要随意修改，这将直接影响统计分析准确率</li>
				<li>2、“推广人”可以是任何竞思员工，即该推广链接所产生的业绩都与其有关</li>
				<li>3、推广链接中的标识代码，是由创建链接时获取，不管如何修改信息都不会再改变</li>
			</ul>
		</div>
		<div id="controlbar">
			<input id="btnSubmit" type="button" class="submit" value="  保存修改  " />
			<input id="btnCancel" type="button" class="submit" value="  返回列表  " onclick="history.back()" />
		</div>
	</div>
</body>
</html>

